﻿using PoemGame.Domain.GameAggregate;
using PoemGame.Domain.Services.Duishi;
using PoemGame.Domain.Services.Feihualing;
using PoemGame.Domain.Services.Jielong;
using PoemService.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PoemGame.Domain.Services.Factory.Simple
{
    public class CheckGameConditionServiceFactory : IDomainServiceFactory<ICheckGameConditionService>
    {
        private readonly IPoemService poemService;
        public CheckGameConditionServiceFactory(IPoemService _poemService)
        {
            poemService = _poemService;
        }
        public ICheckGameConditionService GetService(GameType gamePlayType)
        {
            switch (gamePlayType.MainType)
            {
                case "Duishi":
                    return new DuishiCheckGameConditionService(poemService);
                case "Feihualing":
                    return new FeihualingCheckGameConditionService();
                case "Jielong":
                    return new JielongCheckGameConditionService(poemService);
            }
            return null;
        }
    }
}
